<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>系统管理后台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8" />
    <link href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/animate/animate.min.css">
    <link type="text/css" rel="stylesheet" media="all" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/mmenu/css/jquery.mmenu.all.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/videobackground/css/jquery.videobackground.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap-checkbox.css">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/rickshaw/css/rickshaw.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/morris/css/morris.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/tabdrop/css/tabdrop.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/css/chosen-bootstrap.css">

    <link href="${pageContext.request.contextPath}/static/admin/assets/css/minimal.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/sweetalert.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/daterangepicker-bs3.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/admin/css/daterangepicker-1.3.7.css" rel="stylesheet">

    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <style>
        td a{
            color:#ffffff;
        }
        td a:hover{
            color: #999999;
            text-decoration: none;
        }
        .refresh i{
            padding:5px;
        }
        .daterangepicker{
            margin-top: -40px;
        }
        body #content .tile.transparent-black .form-control[disabled], body #content .tile.transparent-black .form-control[readonly], body #content .tile.transparent-black fieldset[disabled] .form-control, body #content .tile.transparent-white .form-control[disabled], body #content .tile.transparent-white .form-control[readonly], body #content .tile.transparent-white fieldset[disabled] .form-control, body #content .tile-header.transparent-black .form-control[disabled], body #content .tile-header.transparent-black .form-control[readonly], body #content .tile-header.transparent-black fieldset[disabled] .form-control, body #content .tile-header.transparent-white .form-control[disabled], body #content .tile-header.transparent-white .form-control[readonly], body #content .tile-header.transparent-white fieldset[disabled] .form-control, body #content .tile-widget.transparent-black .form-control[disabled], body #content .tile-widget.transparent-black .form-control[readonly], body #content .tile-widget.transparent-black fieldset[disabled] .form-control, body #content .tile-widget.transparent-white .form-control[disabled], body #content .tile-widget.transparent-white .form-control[readonly], body #content .tile-widget.transparent-white fieldset[disabled] .form-control, body #content .tile-body.transparent-black .form-control[disabled], body #content .tile-body.transparent-black .form-control[readonly], body #content .tile-body.transparent-black fieldset[disabled] .form-control, body #content .tile-body.transparent-white .form-control[disabled], body #content .tile-body.transparent-white .form-control[readonly], body #content .tile-body.transparent-white fieldset[disabled] .form-control, body #content .tile-footer.transparent-black .form-control[disabled], body #content .tile-footer.transparent-black .form-control[readonly], body #content .tile-footer.transparent-black fieldset[disabled] .form-control, body #content .tile-footer.transparent-white .form-control[disabled], body #content .tile-footer.transparent-white .form-control[readonly], body #content .tile-footer.transparent-white fieldset[disabled] .form-control, body #content .tile-left-side.transparent-black .form-control[disabled], body #content .tile-left-side.transparent-black .form-control[readonly], body #content .tile-left-side.transparent-black fieldset[disabled] .form-control, body #content .tile-left-side.transparent-white .form-control[disabled], body #content .tile-left-side.transparent-white .form-control[readonly], body #content .tile-left-side.transparent-white fieldset[disabled] .form-control, body #content .tile-right-side.transparent-black .form-control[disabled], body #content .tile-right-side.transparent-black .form-control[readonly], body #content .tile-right-side.transparent-black fieldset[disabled] .form-control, body #content .tile-right-side.transparent-white .form-control[disabled], body #content .tile-right-side.transparent-white .form-control[readonly], body #content .tile-right-side.transparent-white fieldset[disabled] .form-control{
            color: #FFFFFF;
        }
    </style>
</head>
<body class="bg-1">



<!-- Preloader -->
<div class="mask"><div id="loader"></div></div>
<!--/Preloader -->

<!-- Wrap all page content here -->
<div id="wrap">




    <!-- Make page fluid -->
    <div class="row">





        <!-- Fixed navbar -->
        <div class="navbar navbar-default navbar-fixed-top navbar-transparent-black mm-fixed-top" role="navigation" id="navbar">



            <!-- Branding -->
            <div class="navbar-header col-md-2">
                <a class="navbar-brand" href="index.html">
                    <strong>Shakes</strong>Beare
                </a>
                <div class="sidebar-collapse">
                    <a href="#">
                        <i class="fa fa-bars" style="line-height: 45px"></i>
                    </a>
                </div>
            </div>
            <!-- .nav-collapse -->
            <div class="navbar-collapse">
                <!-- Quick Actions -->
                <ul class="nav navbar-nav quick-actions">
                    <li class="dropdown divided">

                        <a class="dropdown-toggle button" data-toggle="dropdown" href="#">
                            <i class="fa fa-envelope"></i>
                            <span class="label label-transparent-black">1</span>
                        </a>

                        <ul class="dropdown-menu wider arrow nopadding messages">
                            <li><h1>You have <strong>1</strong> new message</h1></li>
                            <li>
                                <a class="cyan" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/ici-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Ing. Imrich Kamarel</span>
                                        <span class="time">12 mins</span>
                                        <div class="message-content">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="green" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/arnold-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Arnold Karlsberg</span>
                                        <span class="time">1 hour</span>
                                        <div class="message-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/face.jpeg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">John Douey</span>
                                        <span class="time">3 hours</span>
                                        <div class="message-content">Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="red" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/peter-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">Peter Kay</span>
                                        <span class="time">5 hours</span>
                                        <div class="message-content">Ut enim ad minim veniam, quis nostrud exercitation</div>
                                    </div>
                                </a>
                            </li>

                            <li>
                                <a class="orange" href="#">
                                    <div class="profile-photo">
                                        <img src="${pageContext.request.contextPath}/static/admin/assets/images/george-avatar.jpg" alt />
                                    </div>
                                    <div class="message-info">
                                        <span class="sender">George McCain</span>
                                        <span class="time">6 hours</span>
                                        <div class="message-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit</div>
                                    </div>
                                </a>
                            </li>


                            <li class="topborder"><a href="#">Check all messages <i class="fa fa-angle-right"></i></a></li>
                        </ul>

                    </li>
                    <li class="dropdown divided user" id="current-user">
                        <div class="profile-photo">
                            <img src="${pageContext.request.contextPath}/static/admin/assets/images/face.jpeg" alt />
                        </div>
                        <a class="dropdown-toggle options" data-toggle="dropdown" href="#">
                            管理员 <i class="fa fa-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu arrow settings">

                            <li>

                                <h3>Backgrounds:</h3>
                                <ul id="color-schemes">
                                    <li><a href="#" class="bg-1"></a></li>
                                    <li><a href="#" class="bg-2"></a></li>
                                    <li><a href="#" class="bg-3"></a></li>
                                    <li><a href="#" class="bg-4"></a></li>
                                    <li><a href="#" class="bg-5"></a></li>
                                    <li><a href="#" class="bg-6"></a></li>
                                </ul>

                                <div class="form-group videobg-check">
                                    <div class="col-xs-4 control-label">
                                        <div class="onoffswitch greensea small">
                                            <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="videobg-check">
                                        </div>
                                    </div>
                                </div>

                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="${pageContext.request.contextPath }/admin/setting/index.action"><i class="fa fa-user"></i>修改密码</a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/admin/logout.action"><i class="fa fa-power-off"></i> Logout</a>
                            </li>
                            <li></li>

                        </ul>
                    </li>


                </ul>
                <!-- /Quick Actions -->



                <!-- Sidebar -->
                <ul class="nav navbar-nav side-nav" id="sidebar">

                    <li class="collapsed-content">
                        <ul>
                            <li class="search"><!-- Collapsed search pasting here at 768px --></li>
                        </ul>
                    </li>

                    <li class="navigation" id="navigation">
                        <a href="#" class="sidebar-toggle" data-toggle="#navigation">Navigation <i class="fa fa-angle-up"></i></a>

                        <ul class="menu">

                            <li>
                                <a href="${pageContext.request.contextPath }/admin/index/index.action">
                                    <i class="fa fa-tachometer"></i> 概况
                                    <span class="badge badge-red"></span>
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath}/admin/ad/index.action">
                                    <i class="fa fa-tint"></i> 广告管理
                                </a>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-th-large"></i> 用户管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath}/admin/customer/index.action">
                                            <i class="fa fa-caret-right"></i> 用户管理
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${pageContext.request.contextPath}/admin/customer/resumeIndex.action">
                                            <i class="fa fa-caret-right"></i> 简历管理
                                        </a>
                                    </li>
                                </ul>
                            </li>

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-th-large"></i> 企业管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/company/index.action">
                                            <i class="fa fa-caret-right"></i> 企业用户账号
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/company/verify.action">
                                            <i class="fa fa-caret-right"></i> 企业账号审核
                                        </a>
                                    </li>
                                </ul>
                            </li>

                            <li class="dropdown open active">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-child"></i> 职位管理 <b class="fa fa-plus dropdown-plus"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="${pageContext.request.contextPath }/admin/job/index.action">
                                            <i class="fa fa-caret-right"></i> 职位列表
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                </ul>
                <!-- Sidebar end -->





            </div>
            <!--/.nav-collapse -->





        </div>
        <!-- Fixed navbar end -->






        <!-- Page content -->
        <div id="content" class="col-md-12">









            <!-- page header -->
            <div class="pageheader">
                <h2><i class="fa fa-th-large"></i> 职位管理
                </h2>
            </div>
            <!-- /page header -->






            <!-- content main container -->

            <div class="main">
                <!--具体功能框架写在这里-->
                <div class="col-md-12">



                    <!-- tile -->
                    <section class="tile color transparent-black">



                        <!-- tile header -->
                        <div class="tile-header">
                            <h1><strong>Job</strong> detail</h1>
                            <div class="controls">
                                <a href="#" class="refresh"><i class="fa fa-refresh"></i></a>
                                <a href="#" class="remove"><i class="fa fa-times"></i></a>
                            </div>
                        </div>
                        <!-- /tile header -->

                        <!-- tile body -->
                        <div class="tile-body">

                            <form class="form-horizontal" role="form" parsley-validate id="basicvalidations">

                                <div class="form-group">
                                    <label for="input01" class="col-sm-1 control-label">公司名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input01" readonly value="${job_detail.company.company_name}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input02" class="col-sm-1  control-label">职位名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input02" value="${job_detail.job_name}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="reportrange" class="col-sm-1 control-label">起止时间</label>
                                    <div id="reportrange" class="dateRange btn btn-default btn-sm m-r-lg" style="margin-left: 16px" data-placement="top">
                                        <i class="fa fa-calendar"></i>
                                        <small>选择时间</small>
                                        <span id="searchDateRange"></span>
                                        <b class="caret"></b>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input03" class="col-sm-1 control-label">职位性质</label>
                                    <div class="col-sm-8" id="selectbox">
                                        <select class="chosen-select chosen-transparent form-control" id="input03" parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox">
                                            <c:forEach items="${job_property_list }" var="item">
                                                <c:choose>
                                                    <c:when test="${item.job_property_id == job_detail.job_property_id}">
                                                        <option value="${item.job_property_id}" selected>${item.job_property_name}</option>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <option value="${item.job_property_id}">${item.job_property_name}</option>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input04" class="col-sm-1 control-label">职位类别</label>
                                    <div class="col-sm-8" id="selectbox1">
                                        <select class="chosen-select chosen-transparent form-control" id="input04" parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox1">
                                            <c:forEach items="${job_type_list }" var="item">
                                                <c:choose>
                                                    <c:when test="${item.job_type_id == job_detail.job_type_id}">
                                                        <option value="${item.job_type_id}" selected>${item.job_type_name}</option>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <option value="${item.job_type_id}">${item.job_type_name}</option>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">

                                    <label  class="col-md-1 control-label">招聘要求</label>
                                    <div class="col-md-1" >
                                        <input type="text" class="form-control" maxlength="3" value="${job_detail.number}" id="number">
                                    </div>
                                    <div class="col-md-1"><label  class="col-md-1 control-label" style="padding-left: 5px">人</label></div>
                                    <div class="col-md-3" id="selectbox2">
                                        <select class="chosen-select chosen-transparent form-control " parsley-trigger="change"  parsley-required="true" parsley-error-container="#selectbox2" id="input05">
                                            <option value="0">学历不限</option>
                                            <c:forEach items="${degree_list }" var="item">
                                                <c:choose>
                                                    <c:when test="${item.degree_id == job_detail.degree_id}">
                                                        <option value="${item.degree_id}" selected>${item.degree_name}</option>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <option value="${item.degree_id}">${item.degree_name}</option>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>
                                        </select>
                                    </div>

                                    <div class="col-sm-3" id="selectbox3">
                                        <select class="chosen-select chosen-transparent form-control " parsley-trigger="change"  parsley-required="true" parsley-error-container="#selectbox3" id="input06">
                                            <option value="0" <c:if test="${job_detail.work_year == 0}">selected</c:if>>经验不限</option>
                                            <option value="1" <c:if test="${job_detail.work_year == 1}">selected</c:if>>一年以上</option>
                                            <option value="2" <c:if test="${job_detail.work_year == 2}">selected</c:if>>两年以上</option>
                                            <option value="3" <c:if test="${job_detail.work_year == 3}">selected</c:if>>三年以上</option>
                                            <option value="4" <c:if test="${job_detail.work_year == 4}">selected</c:if>>四年以上</option>
                                            <option value="5" <c:if test="${job_detail.work_year >= 5}">selected</c:if>>五年以上</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input08" class="col-sm-1 control-label">工资水平</label>
                                    <div class="col-sm-4" id="selectbox4">
                                        <select class="chosen-select chosen-transparent form-control"parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox4" id="input07">
                                            <option value="0">面议</option>
                                            <c:forEach items="${salary_type_list }" var="item">
                                                <c:choose>
                                                    <c:when test="${item.salary_type_id == job_detail.salary_type_id}">
                                                        <option value="${item.salary_type_id}" selected>${item.value}</option>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <option value="${item.salary_type_id}">${item.value}</option>
                                                    </c:otherwise>
                                                </c:choose>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="col-md-2"><label  class="col-md-12 control-label" style="padding-left: 5px">是否显示</label></div>
                                    <div class="col-sm-2">
                                        <select class="chosen-select chosen-transparent form-control"parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox4" id="input15">
                                            <option value="0" <c:if test="${job_detail.show_salary == 0}">selected</c:if>>否</option>
                                            <option value="1" <c:if test="${job_detail.show_salary == 1}">selected</c:if>>是</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input05" class="col-sm-1 control-label">职位描述</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" id="input08" rows="6">${job_detail.job_description}</textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input09" class="col-md-1 control-label">亮点标签</label>
                                    <div class="col-sm-8" id="selectbox5">
                                        <select multiple class="chosen-select chosen-transparent form-control" id="input09" parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox5">
                                            <c:forEach items="${job_tag_list }" var="item">
                                                <option value="${item.job_tag_id}" <c:forEach items="${tag_list}" var="tag"><c:choose><c:when test="${tag.tag_id == item.job_tag_id}">selected</c:when></c:choose></c:forEach>>${item.job_tag_name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>



                                <div class="form-group">
                                    <label for="input10" class="col-sm-1 control-label">工作地址</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input10" readonly value="${job_detail.city.name}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input11" class="col-sm-1 control-label"></label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input11" readonly value="${job_detail.zone.name}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input12" class="col-sm-1 control-label"></label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input12" value="${job_detail.address}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input13" class="col-sm-1 control-label">是否发布</label>
                                    <div class="col-sm-8" id="selectbox6">
                                        <select class="chosen-select chosen-transparent form-control" id="input13" parsley-trigger="change" parsley-required="true" parsley-error-container="#selectbox6">
                                            <option value="0" <c:if test="${job_detail.is_publish == 0}">selected</c:if>>否</option>
                                            <option value="1" <c:if test="${job_detail.is_publish == 1}">selected</c:if>>是</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input18" class="col-sm-1 control-label">浏览量</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input18" value="${job_detail.read}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input16" class="col-sm-1 control-label">发布时间</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input16" readonly value="${job_detail.date_added_string}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input17" class="col-sm-1 control-label">最后修改时间</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" id="input17" readonly value="${job_detail.date_modified_string}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="input14" class="col-sm-1 control-label">职位状态</label>
                                    <div class="col-sm-8" id="selectbox7">
                                        <c:choose>
                                            <c:when test="${job_detail.status == 0}">
                                                <input type="text" class="form-control" readonly = "" value="待审核" id="input14">
                                            </c:when>
                                            <c:when test="${job_detail.status == 1}">
                                                <input type="text" class="form-control" readonly = "" value="审核通过" id="input14">
                                            </c:when>
                                            <c:otherwise>
                                                <input type="text" class="form-control" readonly = "" value="审核不通过" id="input14">
                                            </c:otherwise>
                                        </c:choose>
                                    </div>
                                </div>
                                <div class="form-group form-footer">
                                    <div class="col-sm-offset-4 col-sm-8">
                                        <a class="btn btn-primary" onclick="save_job()">保存</a>
                                        <button type="reset" class="btn btn-default">重置</button>
                                    </div>
                                </div>

                            </form>

                        </div>
                        <!-- /tile body -->




                    </section>
                </div>
            </div>
            <!-- /content container -->

        </div>
        <!-- Page content end -->


    </div>
    <!-- Make page fluid-->




</div>
<!-- Wrap all page content end -->



<section class="videocontent" id="video"></section>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="${pageContext.request.contextPath}/static/admin/assets/js/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/mmenu/js/jquery.mmenu.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/sparkline/jquery.sparkline.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/nicescroll/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/animate-numbers/jquery.animateNumbers.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/videobackground/jquery.videobackground.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/blockui/jquery.blockUI.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/flot/jquery.flot.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/flot/jquery.flot.time.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/flot/jquery.flot.selection.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/flot/jquery.flot.animator.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/flot/jquery.flot.orderBars.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/easypiechart/jquery.easypiechart.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/rickshaw/raphael-min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/rickshaw/d3.v2.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/rickshaw/rickshaw.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/morris/morris.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/tabdrop/bootstrap-tabdrop.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/chosen/chosen.jquery.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/assets/js/minimal.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/page.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/sweetalert.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/moment.min.js"></script>

<script src="${pageContext.request.contextPath}/static/admin/js/daterangepicker-1.3.7.js"></script>
<script>
    var start_time = "${job_detail.date_start_string}";
    start_time = moment(start_time, this.format);
    var end_time = "${job_detail.date_end_string}";
    end_time = moment(end_time, this.format);
    $('#reportrange span').html(start_time.format('YYYY/MM/DD') + ' - ' + end_time.format('YYYY/MM/DD'));

    $(function(){

        //chosen select input
        $(".chosen-select").chosen({disable_search_threshold: 10});

    });
    $(document).ready(function (){
        //时间插件
//    $('#reportrange span').html('{$startDate}' + ' - ' + '{$endDate}');
        $('#reportrange').daterangepicker(
                {
                    // startDate: moment().startOf('day'),
                    //endDate: moment(),
                    //minDate: '01/01/2012',    //最小时间
//                        maxDate : moment(), //最大时间
                    dateLimit : {
                        days : 100
                    }, //起止时间的最大间隔
                    showDropdowns : true,
                    showWeekNumbers : false, //是否显示第几周
                    timePicker : false, //是否显示小时和分钟
                    timePickerIncrement : 60, //时间的增量，单位为分钟
                    timePicker12Hour : false, //是否使用12小时制来显示时间
//                    ranges : {
//                        //'最近1小时': [moment().subtract('hours',1), moment()],
//                        '今日': [moment().startOf('day'), moment()],
//                        '昨日': [moment().subtract('days', 1).startOf('day'), moment().subtract('days', 1).endOf('day')],
//                        '最近7日': [moment().subtract('days', 6), moment()],
//                        '最近30日': [moment().subtract('days', 29), moment()],
//                        '上个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')],
//                        '这个月': [moment().startOf('month'), moment()]
//                    },
                    opens : 'right', //日期选择框的弹出位置
                    buttonClasses : [ 'btn btn-default' ],
                    applyClass : 'btn-small btn-primary blue',
                    cancelClass : 'btn-small',
                    format : 'YYYY/MM/DD', //控件中from和to 显示的日期格式
                    separator : ' to ',
                    locale : {
                        applyLabel : '确定',
                        cancelLabel : '取消',
                        fromLabel : '起始时间',
                        toLabel : '结束时间',
                        customRangeLabel : '自定义',
                        daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
                        monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
                            '七月', '八月', '九月', '十月', '十一月', '十二月' ],
                        firstDay : 1
                    }
                }, function(start, end, label){
                    $('#reportrange span').html(start.format('YYYY/MM/DD') + ' - ' + end.format('YYYY/MM/DD'));
                    var startDate = start.format('YYYY-MM-DD HH:mm:ss');
                    var endDate = end.format('YYYY-MM-DD HH:mm:ss');
                });

        //设置日期菜单被选项  --开始--
        /*
         var dateOption ;
         if("${riqi}"=='day') {
         dateOption = "今日";
         }else if("${riqi}"=='yday') {
         dateOption = "昨日";
         }else if("${riqi}"=='week'){
         dateOption ="最近7日";
         }else if("${riqi}"=='month'){
         dateOption ="最近30日";
         }else if("${riqi}"=='year'){
         dateOption ="最近一年";
         }else{
         dateOption = "自定义";
         }
         $(".daterangepicker").find("li").each(function (){
         if($(this).hasClass("active")){
         $(this).removeClass("active");
         }
         if(dateOption==$(this).html()){
         $(this).addClass("active");
         }
         });*/
        //设置日期菜单被选项  --结束--
    });

    function save_job(){
        var job_name = $('#input02').val();
        var time = $('#reportrange span').html();
        time = time.split("-");
        var date_start_string = time[0];
        date_start_string = moment(date_start_string, this.format);
        date_start_string = date_start_string.format('YYYY-MM-DD HH:mm:ss');
        var date_end_string = time[1];
        date_end_string = moment(date_end_string, this.format);
        date_end_string = date_end_string.format('YYYY-MM-DD HH:mm:ss');
        var job_property_id = $('#input03').val();
        var job_type_id = $('#input04').val();
        var number = $('#number').val();
        var degree_id = $('#input05').val();
        var work_year = $('#input06').val();
        var salary_type_id = $('#input07').val();
        var job_description = $('#input08').val();
        var show_salary = $('#input15').val();
        var address = $('#input12').val();
        var is_publish = $('#input13').val();
        var read = $('#input18').val();
        var tag = $('#input09').val();
        if(job_name == ""||number == "" || job_description==""||address==""){
            swal("","请填写完整用户信息！","error");
            return;
        }
        var data = {"job_id":${job_detail.job_id},"job_name":job_name,"date_start_string":date_start_string,"date_end_string":date_end_string,"job_property_id":job_property_id,"job_type_id":job_type_id,"number":number,"degree_id":degree_id,"work_year":work_year,"salary_type_id":salary_type_id,"job_description":job_description,"show_salary":show_salary,"address":address,"is_publish":is_publish,"read":read,"tag":tag};
        $.ajax({
            type:'post',
            url:'${pageContext.request.contextPath}/admin/job/save_job.action',
            contentType:'application/json;charset=utf-8',
            data:JSON.stringify(data),
            success:function(data){
                if(data == -1){
                    swal("","请填写完整用户信息！","error");
                }
                if(data == 1){
                    swal("","保存成功！","success");
                }else{
                    swal("","服务器出错！","error");
                }
            }

        });
    }
</script>
</body>
</html>